<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jQuery.js"></script>
</head>
<body>
    <button>你好</button>
    <button>你好</button>
    <button>你好</button>
    <button>你好</button>
    <button>你好</button>
    <script>
        $(function(){
            // 1. 隐式迭代 给所有的按钮都绑定了点击事件
            $("button").click(function(){
                // 2. 当前的元素变化背景颜色
                //$(this).css('background','red');
                // 3. 其余的兄弟去掉背景颜色 隐式迭代
                //$(this).siblings("button").css('background','');
                
                //链式编程
                $(this).css('background','red').siblings().css('background','');
            })
        })
    </script>
</body>
</html>